##########################################################################
#
#                Admin Over IM
#
##########################################################################
#  <Copyright>
#    Copyright (C) 2008  Basov Alexander
#
#  <Unit> configure.ac
#    <Purpose>
#    <Effects>
#    <Perfomance>
##########################################################################
#  $Revision: 139 $ $Author: coopht $
#  $Date: 2008-03-27 19:02:28 +0000 (Thu, 27 Mar 2008) $
##########################################################################

AC_PREREQ(2.57)
AC_INIT(aoi,0.0.1)
AM_MAINTAINER_MODE

if test "$USE_MAINTAINER_MODE" = "yes" ; then
   # Проверка того, что каталог сборки отличается от каталога
   # исходных текстов.
   if test "`cd ${srcdir} && pwd`" = "`cd . && pwd`" ; then
       AC_MSG_ERROR([Building in the source directory not supported in maintainer mode.])
    fi
fi

AM_INIT_AUTOMAKE([foreign 1.10])
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
AC_PROG_CXX
AC_PROG_LIBTOOL

AC_SUBST(SED)

PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.6.29)

AC_CHECK_PROGS(FOP,[fop],[""])

if test "$FOP" = "" ; then

   if test "$USE_MAINTAINER_MODE" = "yes" ; then
      # В режиме разработчика необхходимо наличие абсолютно всех средств для разработки данного проекта.
       AC_MSG_ERROR([fop not found, documentation will not be build])
   else

       AC_MSG_WARN([fop not found, documentation will not be build])
   fi

else
    AC_CONFIG_FILES([fopwrapper], [chmod +x fopwrapper])
fi

AC_OUTPUT([
	Makefile
	documentation/Makefile
	documentation/developers_guide/Makefile
	documentation/explanatory_note/Makefile
	documentation/explanatory_note/img/Makefile
	source/Makefile
	source/client/Makefile
	source/libs/Makefile
	source/libs/jabber/Makefile
	source/libs/aoi/Makefile
	source/server/Makefile
	testsuite/Makefile
	testsuite/libs/Makefile
	testsuite/libs/jabber/Makefile
])
	